import { Component, Injector, ViewEncapsulation } from '@angular/core';
import { AppComponentBase } from '@shared/common/app-component-base';
import { PipelineListDto } from '@shared/service-proxies/service-proxies';
import { finalize } from 'rxjs/operators';
import { appModuleAnimation } from '@shared/animations/routerTransition';

@Component({
  selector: 'GZ1',
  templateUrl: './gz1.component.html',
  styleUrls: ['./gz1.component.less'],
  encapsulation: ViewEncapsulation.None,
  animations: [appModuleAnimation()]
})

export class GZ1ModalComponent extends AppComponentBase {

  saving = false;

  pipe: PipelineListDto = new PipelineListDto();

  constructor(
    injector: Injector,
    //private _taskServiceProxy: WorkshopTaskGatewayServiceProxy  //添加自己需要的领域服务
  ) {
    super(injector);
  }

  /**
  * 在modal show 方法中调用
  * 这里 加载 页面所需要的 datas
  *
  * @param {PipelineListDto} pipe
  * @memberof GZ1ModalComponent
  */
  load(pipe: PipelineListDto): void {
    this.pipe = pipe;
  }

  /**
  * 领域服务保存方法
  *
  * @memberof GZ1ModalComponent
  */
  save(): void {
    // this.saving = true;

    // this._taskServiceProxy.doingSomething(this.pipe.id)
    //   .pipe(finalize(() => { this.saving = false; }))
    //   .subscribe(result => {
    //     this.notify.success('保存成功');
    //   });
  }

}
